home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / N-P / Open Prolog 1.02.sit / Open Prolog 1.02 / Samples / puzzle next >
MacBinary  |  1993-10-06  |  1.4 KB  |  [TEXT/PRLG]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: puzzle

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Oct 6 13:12:04 1993, modified Wed Oct 6 13:12:04 1993, creator 'PRLG', type ASCII, 862 bytes "puzzle" , at 0x3de 354 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[PRLG]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 70 75 7a 7a 6c 65 | 00 00 00 00 00 00 00 00 |..puzzle|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 50 52 4c | 47 01 00 00 00 00 00 00 |.TEXTPRL|G.......|
|00000050| 00 00 00 00 00 03 5e 00 | 00 01 62 a8 d8 ac e4 a8 |......^.|..b.....|
|00000060| d8 ac e4 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 5d a7 00 00 |........|....]...|
|00000080| 0d 25 73 69 6d 70 6c 65 | 20 70 75 7a 7a 6c 65 3a |.%simple| puzzle:|
|00000090| 20 70 69 63 6b 20 61 20 | 6e 75 6d 62 65 72 20 77 | pick a |number w|
|000000a0| 69 74 68 20 61 6c 6c 20 | 6e 69 6e 65 20 64 69 67 |ith all |nine dig|
|000000b0| 69 74 73 20 31 2c 32 2c | 33 2c 34 2c 35 2c 36 2c |its 1,2,|3,4,5,6,|
|000000c0| 37 2c 38 2c 39 20 69 6e | 20 69 74 20 65 78 61 63 |7,8,9 in| it exac|
|000000d0| 74 6c 79 20 6f 6e 63 65 | 2c 0d 25 73 75 63 68 20 |tly once|,.%such |
|000000e0| 74 68 61 74 20 74 68 65 | 20 66 69 72 73 74 20 6b |that the| first k|
|000000f0| 20 64 69 67 69 74 73 20 | 69 6e 20 74 68 65 20 6e | digits |in the n|
|00000100| 75 6d 62 65 72 20 61 72 | 65 20 64 69 76 69 73 69 |umber ar|e divisi|
|00000110| 62 6c 65 20 62 79 20 6b | 2c 20 66 6f 72 20 6b 20 |ble by k|, for k |
|00000120| 66 72 6f 6d 20 31 20 74 | 6f 20 39 2e 0d 0d 25 63 |from 1 t|o 9...%c|
|00000130| 61 6c 6c 3a 20 73 74 61 | 67 65 44 69 76 28 22 31 |all: sta|geDiv("1|
|00000140| 32 33 34 35 36 37 38 39 | 22 2c 31 2c 5b 5d 2c 52 |23456789|",1,[],R|
|00000150| 65 73 75 6c 74 29 2e 0d | 0d 73 74 61 67 65 44 69 |esult)..|.stageDi|
|00000160| 76 28 5b 5d 2c 44 69 76 | 69 73 6f 72 2c 52 65 73 |v([],Div|isor,Res|
|00000170| 75 6c 74 2c 4e 65 77 4e | 75 6d 62 65 72 29 20 3a |ult,NewN|umber) :|
|00000180| 2d 20 25 66 69 6e 69 73 | 68 65 64 20 2d 20 6a 75 |- %finis|hed - ju|
|00000190| 73 74 20 67 65 6e 65 72 | 61 74 65 20 72 65 73 75 |st gener|ate resu|
|000001a0| 6c 74 20 6e 75 6d 62 65 | 72 20 66 72 6f 6d 20 73 |lt numbe|r from s|
|000001b0| 74 72 69 6e 67 0d 20 20 | 20 20 20 20 20 20 6e 61 |tring. | na|
|000001c0| 6d 65 28 4e 65 77 4e 75 | 6d 62 65 72 2c 52 65 73 |me(NewNu|mber,Res|
|000001d0| 75 6c 74 29 2e 0d 73 74 | 61 67 65 44 69 76 28 44 |ult)..st|ageDiv(D|
|000001e0| 69 67 69 74 73 2c 44 69 | 76 69 73 6f 72 2c 44 69 |igits,Di|visor,Di|
|000001f0| 67 69 74 4c 69 73 74 53 | 6f 46 61 72 2c 52 65 73 |gitListS|oFar,Res|
|00000200| 75 6c 74 29 20 3a 2d 0d | 20 20 20 20 20 20 20 20 |ult) :-.| |
|00000210| 73 65 6c 65 63 74 28 4e | 65 77 44 69 67 69 74 2c |select(N|ewDigit,|
|00000220| 44 69 67 69 74 73 2c 52 | 65 73 74 4f 66 44 69 67 |Digits,R|estOfDig|
|00000230| 69 74 73 29 2c 20 25 70 | 69 63 6b 20 73 6f 6d 65 |its), %p|ick some|
|00000240| 20 64 69 67 69 74 0d 20 | 20 20 20 20 20 20 20 61 | digit. | a|
|00000250| 70 70 65 6e 64 28 44 69 | 67 69 74 4c 69 73 74 53 |ppend(Di|gitListS|
|00000260| 6f 46 61 72 2c 5b 4e 65 | 77 44 69 67 69 74 5d 2c |oFar,[Ne|wDigit],|
|00000270| 4e 65 77 44 69 67 69 74 | 4c 69 73 74 29 2c 0d 20 |NewDigit|List),. |
|00000280| 20 20 20 20 20 20 20 6e | 61 6d 65 28 4e 65 77 4e | n|ame(NewN|
|00000290| 75 6d 62 65 72 2c 4e 65 | 77 44 69 67 69 74 4c 69 |umber,Ne|wDigitLi|
|000002a0| 73 74 29 2c 20 25 74 75 | 72 6e 20 69 74 20 69 6e |st), %tu|rn it in|
|000002b0| 74 6f 20 61 20 6e 75 6d | 62 65 72 0d 20 20 20 20 |to a num|ber. |
|000002c0| 20 20 20 20 30 20 69 73 | 20 4e 65 77 4e 75 6d 62 | 0 is| NewNumb|
|000002d0| 65 72 20 6d 6f 64 20 44 | 69 76 69 73 6f 72 2c 20 |er mod D|ivisor, |
|000002e0| 25 63 68 65 63 6b 20 61 | 67 61 69 6e 73 74 20 6e |%check a|gainst n|
|000002f0| 65 78 74 20 64 69 76 69 | 73 6f 72 0d 20 20 20 20 |ext divi|sor. |
|00000300| 20 20 20 20 4e 65 77 44 | 69 76 69 73 6f 72 20 69 | NewD|ivisor i|
|00000310| 73 20 44 69 76 69 73 6f | 72 2b 31 2c 0d 20 20 20 |s Diviso|r+1,. |
|00000320| 20 20 20 20 20 73 74 61 | 67 65 44 69 76 28 52 65 | sta|geDiv(Re|
|00000330| 73 74 4f 66 44 69 67 69 | 74 73 2c 4e 65 77 44 69 |stOfDigi|ts,NewDi|
|00000340| 76 69 73 6f 72 2c 4e 65 | 77 44 69 67 69 74 4c 69 |visor,Ne|wDigitLi|
|00000350| 73 74 2c 52 65 73 75 6c | 74 29 2e 20 25 64 6f 20 |st,Resul|t). %do |
|00000360| 74 68 65 20 72 65 73 74 | 0d 0d 61 70 70 65 6e 64 |the rest|..append|
|00000370| 28 5b 5d 2c 58 2c 58 29 | 2e 0d 61 70 70 65 6e 64 |([],X,X)|..append|
|00000380| 28 5b 58 7c 59 5d 2c 5a | 2c 5b 58 7c 52 5d 29 20 |([X|Y],Z|,[X|R]) |
|00000390| 3a 2d 20 61 70 70 65 6e | 64 28 59 2c 5a 2c 52 29 |:- appen|d(Y,Z,R)|
|000003a0| 2e 0d 0d 73 65 6c 65 63 | 74 28 58 2c 5b 58 7c 52 |...selec|t(X,[X|R|
|000003b0| 5d 2c 52 29 2e 0d 73 65 | 6c 65 63 74 28 58 2c 5b |],R)..se|lect(X,[|
|000003c0| 59 7c 52 5d 2c 5b 59 7c | 5a 5d 29 20 3a 2d 20 73 |Y|R],[Y||Z]) :- s|
|000003d0| 65 6c 65 63 74 28 58 2c | 52 2c 5a 29 2e 0d 00 00 |elect(X,|R,Z)....|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 30 | 00 00 00 30 00 00 00 32 |.......0|...0...2|
|00000410| 20 20 20 20 20 20 20 20 | 20 20 20 70 6c 69 73 74 | | plist|
|00000420| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |);. | |
|00000430| 06 70 75 7a 7a 6c 65 70 | 02 00 00 00 50 61 72 74 |.puzzlep|....Part|
|00000440| 53 49 54 21 00 00 00 00 | 00 00 00 00 00 00 12 7f |SIT!....|........|
|00000450| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 a9 c7 3a 46 00 00 | 00 00 00 00 01 62 20 20 |....:F..|.....b |
|00000480| 20 20 20 20 20 20 20 43 | 41 53 45 20 69 64 20 4f | C|ASE id O|
|00000490| 46 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |F. | |
|000004a0| 20 20 31 3a 20 3b 0d 20 | 20 20 20 20 20 20 20 20 | 1: ;. | |
|000004b0| 20 20 20 20 20 20 20 32 | 3a 20 3b 0d 20 20 20 20 | 2|: ;. |
|000004c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 4f 54 48 45 | | OTHE|
|000004d0| 52 57 49 53 45 0d 20 20 | 20 20 20 20 20 20 20 20 |RWISE. | |
|000004e0| 20 20 20 20 20 20 20 20 | 73 69 67 6e 61 6c 45 72 | |signalEr|
|000004f0| 72 6f 72 28 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |ror(impl|ementati|
|00000500| 00 00 00 2c 01 02 80 08 | 00 00 05 31 2e 30 2e 32 |...,....|...1.0.2|
|00000510| 1f 44 6f 63 75 6d 65 6e | 74 73 20 66 6f 72 20 4f |.Documen|ts for O|
|00000520| 70 65 6e 20 50 72 6f 6c | 6f 67 20 31 2e 30 2e 32 |pen Prol|og 1.0.2|
|00000530| 00 00 01 00 00 00 01 30 | 00 00 00 30 00 00 00 32 |.......0|...0...2|
|00000540| 00 46 73 f8 19 b6 00 00 | 00 1c 00 32 00 00 76 65 |.Fs.....|...2..ve|
|00000550| 72 73 00 00 00 0a 00 01 | ff ff 00 00 00 00 00 46 |rs......|.......F|
|00000560| 73 8c 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.......|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+